//
//  SocketManager.h
//  Server
//
//  Created by jyh on 2018/7/25.
//  Copyright © 2018年 huig. All rights reserved.
//

#import <Foundation/Foundation.h>
@class SocketManager;
@protocol SocketManagerDelegate <NSObject>

/**
 接收到信息,将信息传递出去

 @param socket self
 @param message 信息
 */
- (void)socketManager:(SocketManager *)socket message:(NSString *)message;
@end

@interface SocketManager : NSObject
@property (nonatomic, weak) id<SocketManagerDelegate> delegate;

+ (instancetype)shareInstance;

/**
 开启监听

 @param post 端口
 @return 返回结果
 */
- (BOOL)startConnectWithPost:(NSInteger)post;

/**
 发送信息到客户端

 @param data 信息内容
 */
- (void)sendMessageToClient:(NSData *)data;
@end
